home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 June / macformat-038.iso / Demos / Interactive Wave / _DATAS / SHARED.Dxr / 00979_Macro gestion Boutons -Quitter -.ls < prev    next >
Encoding:
Text File  |  1995-08-06  |  1.7 KB  |  73 lines

  1. on SetDcQuit AccuA
  2.   global DcQuit
  3.   set DcQuit to AccuA
  4. end
  5.  
  6. on Quitter
  7.   global DcQuit, DcBarrette, SprFondBar, SprFondBarII, SprBoutBar, CastEfface
  8.   if (DcQuit = 1) or (DcBarrette = 0) then
  9.     exit
  10.   end if
  11.   PlayClick()
  12.   set the locV of sprite SprBoutBar to the locV of sprite SprFondBar
  13.   set the locH of sprite SprBoutBar to the locH of sprite SprFondBar
  14.   set the castNum of sprite SprBoutBar to CastEfface
  15.   set the ink of sprite SprBoutBar to 0
  16.   set the locV of sprite SprFondBarII to the locV of sprite SprFondBar
  17.   set the locH of sprite SprFondBarII to the locH of sprite SprFondBar
  18.   set the castNum of sprite SprFondBarII to the number of cast "FNDQUIT"
  19.   PuppetTransit(9, 1, 4, 1)
  20.   updateStage()
  21.   SetDcQuit(1)
  22. end
  23.  
  24. on GestQuit
  25.   global SprBoutBar, CastEfface, SprFondBar, mouseDown, DcCursMain
  26.   set AccuG to CastEfface
  27.   if rollOver(SprFondBar) then
  28.     set AccuX to the mouseH
  29.     if AccuX > 500 then
  30.       set AccuG to the number of cast "BoutNonQuit"
  31.       set DcCursMain to 1
  32.     end if
  33.     if AccuX < 200 then
  34.       set AccuG to the number of cast "BoutOuiQuit"
  35.       set DcCursMain to 1
  36.     end if
  37.   end if
  38.   set the castNum of sprite SprBoutBar to AccuG
  39. end
  40.  
  41. on NonQuit
  42.   global DcQuit
  43.   if DcQuit = 0 then
  44.     exit
  45.   end if
  46.   PlayClick()
  47.   MacFinQuit()
  48. end
  49.  
  50. on OuiQuit
  51.   global DcQuit
  52.   if DcQuit = 0 then
  53.     exit
  54.   end if
  55.   PlayClick()
  56.   MacFinQuit()
  57.   set t to " N_Quitter"
  58.   set C to t & t & "2" & t & "3" & t & "4" & t & "5" & t & "6" & t & "7" & t & "8" & t & "9" & t & "10" & t & "11" & " N_Vide"
  59.   AnimBouton(C)
  60.   RemetAnimBouton("N_Vide")
  61.   GoMovie("NAVIG")
  62. end
  63.  
  64. on MacFinQuit
  65.   global TypeBarrette
  66.   PuppetTransit(10, 1, 4, 1)
  67.   set AccuA to chars(TypeBarrette, 10, 16)
  68.   InitBarrette(AccuA)
  69.   updateStage()
  70.   SetDcQuit(0)
  71.   UnLoadReste()
  72. end
  73.